package com.ln.dm1031.demo02;

/**
 * @author Ln
 * @version 终极版
 * @date 2022/10/31 15:00
 */
public class Test2 {
    public static void main(String[] args) {
        //创建任务对象
        MyRunnable myRunnable = new MyRunnable();
        //创建线程对象
        Thread thread = new Thread(myRunnable);
        //创建线程对象
        Thread thread1 = new Thread(myRunnable);

        thread.start();

        thread1.start();
        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName()+"执行main======"+i);
        }


    }
}
